package com.cskaoyan.model.vo.fileupload;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.util.Date;

/**
 * @program: project-market
 * @description: 文件上传后, 添加完数据库记录, 前端响应信息返回VO对象
 * @author: Jesson Guo
 * @create: 2021-11-30 19:58
 **/
@Data
public class FileUploadData {
    private Integer id;
    private String key;
    private String name;
    private String type;
    private int size;
    private String url;
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date addTime;
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    public FileUploadData(Integer id, String key, String name, String type, int size, String url, Date addTime, Date updateTime) {
        this.id = id;
        this.key = key;
        this.name = name;
        this.type = type;
        this.size = size;
        this.url = url;
        this.addTime = addTime;
        this.updateTime = updateTime;
    }
}
